package cn.edu.ncu.housinghub.mapper.admin;


import cn.edu.ncu.housinghub.entity.user.Administrator;
import org.apache.ibatis.annotations.*;

@Mapper

public interface AdminMapper {
    //  管理员登录（根据用户名和密码）
    @Select("select administratorId, administratorName, administratorPassword from administrator " +
            "where administratorName = #{adminName} and administratorPassword=#{password}")
    Administrator selectAdmin(String adminName, String password);

    //  根据用户名查询管理员
    @Select("select administratorId, administratorName, administratorPassword from administrator where administratorName = #{username}")
    Administrator selectAdminByUsername(String username);
}
